package com.xiaocg.base;

/**
 * @author xiaocg
 */
public class SailTicket {
    public static void main(String[] args) {
        Ticket ticket = new Ticket();
        Thread cc = new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 10; i++) {
                    ticket.sailTicket();
                }
            }
        }, "CC11");
        cc.start();

        Thread aa = new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 15; i++) {
                    ticket.sailTicket();
                }
            }
        }, "AA11");
        aa.start();

        Thread bb = new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 15; i++) {
                    ticket.sailTicket();
                }
            }
        }, "BB11");
        bb.start();


    }
}
